/**
 * Copyright (c) 2012 Fujian FUNO Mobile Communication Technology Co., Ltd.
 * All rights reserved by FUNO.
 */
package com.funo.ehealth.main;

import java.io.IOException;
import java.util.Properties;
import com.funo.ehealth.exception.ConfigInitException;

/** 
 * TODO
 * 
 * @version V1.1
 * @author zhangguangying
 * @date 2013-1-31
 */
public class BussinessMgr {
	
	/**
	 * myconfig.properties配置文件名
	 */
	private static final String MYCONFIG_CONF_FILE = "myconfig.properties";
	/**
	 * VGOP服务器地址
	 */
	public static String vgopserver = null;
	/**
	 * 上行到CP重新的限制时间，如n分钟内的同步
	 */
	public static String upToCpLimitMinutes = null;
	
	public static String cp_service_codes = null;
	
	/**
	 * 初始化 myconfig.properties配置
	 */
	public static void loadMyConfig(){
		Properties myconfig = new Properties();
		try {
			myconfig.load(BussinessMgr.class.getClassLoader().getResourceAsStream(MYCONFIG_CONF_FILE));
		} catch (IOException e) {
			throw new ConfigInitException(MYCONFIG_CONF_FILE+"初始化异常",e);
		}
		
		vgopserver = myconfig.getProperty("vgopserver");
		upToCpLimitMinutes = myconfig.getProperty("upToCpLimitMinutes");
		cp_service_codes = myconfig.getProperty("cp_service_codes");
	}
	
	public static void main(String[] args) {
		loadMyConfig();
		System.out.println(vgopserver);
	}

}
